/**
 * Created by abdulazizalonizi on 7/22/17.
 */
import java.util.Scanner;
public class Task4 {
    public static void main (String [] args)
    {
        Scanner kb = new Scanner (System.in);
   System.out.println("enter 1 , to Find area and perimeter of a rectangle \nenter 2 , to Find area and circumference of a circle ");
        int choice = kb.nextInt();

        if(choice == 1)
        {
            System.out.println("enter length and width of perimeter");
            int len = kb.nextInt();
            int wid = kb.nextInt();

            int area = len*wid;
            int perimeter = 2*(len+wid);

            System.out.println("area = " + area + "\n" + "perimeter = " + perimeter);
        }
        else if (choice == 2)
        {
          System.out.println("enter radius of the circle");
          double r = kb.nextDouble();

            double circu = 2*Math.PI*r;
            double area = Math.PI*Math.pow(r,2);

            System.out.println("circumfrece = " + circu +"\n" + "area = " + area);


        }
        else
            System.out.println("you entered a wrong number !");




    }
}
